import 'package:flutter_for_get/page/index.dart';

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_nice_widgets/flutter_nice_widgets.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: WelComePage(title: '表，你真的是太帅了！'),
    );
  }
}

class WelComePage extends StatefulWidget {
  WelComePage({Key? key, required this.title}) : super(key: key);

  final String title;

  @override
  _WelComePageState createState() => _WelComePageState();
}

class _WelComePageState extends State<WelComePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'hello_body',
            ),
            NButton(
              text: 'default_button',
              type: NButtonType.Default,
              onTap: () {
                Get.to(HomePage());
              },
            ),
          ],
        ),
      ),
    );
  }
}
